package com.beeantec.jnrerc.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 会员
 * </p>
 *
 * @author anthony
 * @since 2021-12-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("member")
public class Member extends Model<Member> {

    private static final long serialVersionUID = 1L;

    /**
     * 会员Id
     */
    @TableId(value = "memberId", type = IdType.AUTO)
    private Integer memberId;

    /**
     * 昵称
     */
    @TableField("nickName")
    private String nickName;

    /**
     * 0:未知 1:男 2:女
     */
    private Integer gender;

    /**
     * 微信openId
     */
    @TableField("wxOpenid")
    private String wxOpenid;

    /**
     * 电话
     */
    private String phone;

    /**
     * unionId
     */
    @TableField("wxUnionid")
    private String wxUnionid;

    /**
     * 微信头像
     */
    @TableField("avatarUrl")
    private String avatarUrl;

    /**
     * 会员状态 0:冻结 1:正常
     */
    private Integer state;

    private String identifier;

    @TableField("pushToken")
    private String pushToken;

    /**
     * 1 内部人员 0 外部人员
     */
    private Integer memberType;

    /**
     * 设备号id
     */
    @TableField("deviceId")
    private String deviceId;

    /**
     * 部门id
     */
    private Integer depId;

    /**
     * 岗位Id
     */
    private Integer jobId;

    /**
     * 经验值
     */
    private Integer exp;

    /**
     * 魅力值
     */
    private Integer charm;

    /**
     * 积分值
     */
    @TableField("Integral")
    private Integer Integral;

    @TableField("roleIds")
    private String roleIds;


    public static final String MEMBERID = "memberId";

    public static final String NICKNAME = "nickName";

    public static final String GENDER = "gender";

    public static final String WXOPENID = "wxOpenid";

    public static final String PHONE = "phone";

    public static final String WXUNIONID = "wxUnionid";

    public static final String AVATARURL = "avatarUrl";

    public static final String STATE = "state";

    public static final String IDENTIFIER = "identifier";

    public static final String PUSHTOKEN = "pushToken";

    public static final String MEMBER_TYPE = "member_type";

    public static final String DEVICEID = "deviceId";

    public static final String DEP_ID = "dep_id";

    public static final String JOB_ID = "job_id";

    public static final String EXP = "exp";

    public static final String CHARM = "charm";

    public static final String INTEGRAL = "Integral";

    public static final String ROLEIDS = "roleIds";

    @Override
    protected Serializable pkVal() {
        return this.memberId;
    }

}
